﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Oya.Entities
{
    public class MonstresCollection : ICollection<MonstreBase>
    {
        private List<MonstreBase> monstres;

        public int Count
        {
            get
            {
                return ((ICollection<MonstreBase>)monstres).Count;
            }
        }

        public bool IsReadOnly
        {
            get
            {
                return ((ICollection<MonstreBase>)monstres).IsReadOnly;
            }
        }

        public List<MonstreBase> Monstres
        {
            get { return monstres; }
            set { monstres = value; }
        }

        public void Add(MonstreBase item)
        {
            ((ICollection<MonstreBase>)monstres).Add(item);
        }

        public void Clear()
        {
            ((ICollection<MonstreBase>)monstres).Clear();
        }

        public bool Contains(MonstreBase item)
        {
            return ((ICollection<MonstreBase>)monstres).Contains(item);
        }

        public void CopyTo(MonstreBase[] array, int arrayIndex)
        {
            ((ICollection<MonstreBase>)monstres).CopyTo(array, arrayIndex);
        }

        public IEnumerator<MonstreBase> GetEnumerator()
        {
            return ((ICollection<MonstreBase>)monstres).GetEnumerator();
        }

        public bool Remove(MonstreBase item)
        {
            return ((ICollection<MonstreBase>)monstres).Remove(item);
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return ((ICollection<MonstreBase>)monstres).GetEnumerator();
        }
    }
}
